package smashedapples.events
{
	import flash.events.Event;
	
	//import smashedapples.types.Struct;

	public class StructEvent extends Event
	{
		
		public static const STRUCT_CHANGE : String = "structChange";
		
		public function StructEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
		
		public var key : String;
		
		
		[Inspectable(enumeration="add,update,remove")]
		public var kind : String;
		
		
		public var struct : Struct;
		
		
		public static function create(kind:String, struct : Struct, key:String=null):StructEvent
		{
			var event : StructEvent = new StructEvent( StructEvent.STRUCT_CHANGE, true, false );
			event.struct = struct;
			event.key = key;
			event.kind = kind;
			
			return event;
		}
		
		
		
		
		
	}
}